home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
disk
/
bakup
/
mrbk220.lha
/
Install-MRBackup
< prev
next >
Wrap
Text File
|
1995-02-20
|
7KB
|
296 lines
; Installer script for installing MRBackup Professional
(set @default_dest "SYS:MRBackup")
(set @app-name "MRBackup Professional")
; Establish an error cleanup routine.
(onerror
(makeassign "MRBackup" (safe))
)
; Get the version of the OS:
( set osVersion (getversion) )
( set osVer (/ osVersion 65536))
( set osRev (- osVersion (* osVer 65536) ) )
( message ("You are currently running AmigaDOS %ld.%ld" osVer osRev ) )
; See if this is really an update.
(set is_update 0)
(set MRBackup_dest (getassign "MRBackup" "a"))
; If it's an update, be sure user wants to use the same target directory.
(if MRBackup_dest
; then
(if (askbool
(prompt "Your current copy of MRBackup Professional appears to be located in the drawer named \""
MRBackup_dest
"\". Do you want the update installed in that drawer?"
)
(help
"The installer has determined that you may already have a "
"copy of MRBackup installed on your system. If this is wrong or "
"you want the update installed elsewhere, select NO as an "
"answer. Otherwise, select YES."
)
(default 1)
)
(set is_update 1) ; if user wants in same place
(set MRBackup_dest ; if user wants in different place
(askdir
(prompt "In which disk or drawer should MRBackup Professional be installed?")
(help @askdir-help)
(default "SYS:MRBackup")
)
)
)
; else
(
(set MRBackup_dest
(askdir
(prompt "In which disk or drawer should MRBackup Professional be installed?")
(help @askdir-help)
(default "SYS:MRBackup")
)
)
)
)
(if (not (exists MRBackup_dest) )
(makedir MRBackup_dest (infos) (confirm) (help)
(prompt "Creating destination directory...")
)
)
(makeassign "MRBackup" MRBackup_dest (safe))
; Now lock on to volume 'MRBackup'.
;(askdisk
; (prompt "Please insert the disk labeled \"MRBackup Professional\".")
; (help "The MRBackup Professional program and support files will be copied "
; "from this disk onto your system.")
; (dest "MRBackup Professional")
; (newname "MRBackupInstallDisk")
;)
; Create a logical assignment to the current directory.
(makeassign "MRBackupInstallDisk" "" (safe) )
; Make MRBackup drawer & icon if not there
(if (not is_update)
(makedir MRBackup_dest (infos))
)
(makedir (tackon MRBackup_dest "Work"))
(makedir (tackon MRBackup_dest "Catalogs"))
(makedir (tackon MRBackup_Dest "Lists_and_Logs"))
; At this point we have a valid destination, so we tell installer where
; the application will end up so the exit page will be correct -- also,
; the installation log file (if any) will be copied to the destination
(set @default-dest MRBackup_dest)
(set cpu_prompt (cat
"If you have an accelerated Amiga with a 68020/68030/68040 CPU, you "
"can elect to install a special version of the software configured "
"for your accelerated CPU. DO NOT SELECT \"Accelerated CPU\" if you have "
"a stock 68000 CPU or your machine will crash when you attempt to run "
"the accelerated version of the software."
)
)
(set cpu_type
(askchoice
(prompt cpu_prompt)
(choices "Stock CPU" "Accelerated CPU")
(help
"This prompt allows you to select a special version of the software "
"which takes advantage of an accelerated CPU, should you have one "
"installed in your Amiga."
)
(default 0)
)
)
(if (= cpu_type 0)
(set cpu_type "")
(set cpu_type "_020")
)
; Copy the user's registration key if it exists on the install disk.
(if (exists "MRBackupInstallDisk:mrbackup.key")
(copyfiles
(source "MRBackupInstallDisk:mrbackup.key")
(dest MRBackup_dest)
)
)
(copyfiles
(source "MRBackupInstallDisk:")
(pattern "#?.info")
(dest MRBackup_dest)
)
(copyfiles
(source "MRBackupInstallDisk:Rexx")
(dest (tackon MRBackup_dest "Rexx") )
(all)
(infos)
)
;
; Delete previous .guide files. Older versions of MRBackup had many
; files. This version has only one.
;
(
if is_update
; then
(
foreach (tackon MRBackup_dest "Help")
"#?.guide"
( delete @each-name )
)
)
(copyfiles
(source "MRBackupInstallDisk:Help")
(dest (tackon MRBackup_dest "Help") )
(all)
(infos)
)
(copyfiles
(source "MRBackupInstallDisk:Help.info")
(dest MRBackup_dest)
)
( if is_update
(set copy_prefs
(askbool (prompt "Overwrite preferences files?")
(help "If you answer Yes, your existing preferences "
"files will be overwritten. "
)
)
)
( set copy_prefs 1 )
)
( if copy_prefs
( copyfiles
(source "MRBackupInstallDisk:Prefs")
(dest (tackon MRBackup_dest "Prefs") )
(all)
(infos)
)
( transcript "Preferences files were not copied." )
)
(copyfiles
(source "MRBackupInstallDisk:Prefs.info")
(dest MRBackup_dest)
)
(copyfiles
(source "MRBackupInstallDisk:Docs")
(dest (tackon MRBackup_dest "Docs") )
(all)
(infos)
)
(copyfiles
(source "MRBackupInstallDisk:Docs.info")
(dest MRBackup_Dest)
)
; The shareware diskette has a special document at the top level.
(if (exists "MRBackupInstallDisk:ShareWare")
(copyfiles
(source "MRBackupInstallDisk:")
(pattern "(ShareWare|ShareWare.info)")
(dest MRBackup_dest)
)
)
(copyfiles
(source "MRBackupInstallDisk:")
(pattern "(MRBackup|MRBackup.info|Compressor.info|FormatDisk|FormatDisk.info)")
(dest MRBackup_dest)
)
(set compressor_name (cat "Compressor" cpu_type))
(copyfiles
(source (tackon "MRBackupInstallDisk:" compressor_name) )
(dest MRBackup_dest)
(newname (tackon MRBackup_dest "Compressor" ) )
)
(working "Updating MRBackup icon...")
(tooltype
(dest MRBackup_dest)
(noposition)
)
; Copy MRBackup's tape handler to the L: directory.
(working "Copying MRTape-Handler...")
(copylib
(source "MRBackupInstallDisk:L/mrtape-handler")
(dest "L:")
)
(working "")
; modify S:User-Startup
(startup "MRBackup"
(prompt
"Some instructions need to be added to the \"S:user-startup\" "
"so that your system will be properly configured to use MRBackup.")
(help "Do this or MRBackup won't work!!")
(command
"ASSIGN MRBackup: \"" MRBackup_dest "\"\n"
the_cache
)
)
; reinitialize assigns
(if (not @pretend)
(
(makeassign "MRBackup" MRBackup_dest)
)
)
(
( copyfiles
( source "MRBackupInstallDisk:Devs" )
( dest (tackon MRBackup_dest "Devs" ) )
( all )
( infos )
)
( message
"The MRTape mountlist entries have been placed in MRBackup:Devs."
)
)
(complete 100)
; cleanup
(makeassign "MRBackupInstallDisk" (safe))
; this is not strictly necessary, but doesn't hurt -- there is always
; a default (exit) at the end of any script
(exit)